GCD Property of the Division Algorithm

Theorem

For integers a and b with b0, if the division algorithm for integers is applied as follows

a=bq+r,

then gcd(a,b)=gcd(b,r).

Proof

To prove the above, we proceed by showing independently that gcd(a,b)gcd(b,r) and gcd(a,b)gcd(b,r).

Let g1=gcd(a,b). By definition g1a and g1b. From this, g1bq and therefore g1bqa=r. This means that g1 is a common divisor of b and r, but not necessarily the greatest. Hence

gcd(a,b)gcd(b,r).

We then make a similar argument in the opposite direction. Let g2=gcd(b,r). By definition g2b and g2r. From this, g2bq and therefore g2bq+r=a. This means that g2 is a common divisor of a and b, but not necessarily the greatest. Hence:

gcd(a,b)gcd(b,r).

Combining the above results proves equality:

gcd(a,b)=gcd(b,r).